Moving picture coding system compensates for motion using motion vector information. In case of moving picture coding system that uses multiple reference picture, reference picture index information as well as motion vector information is required for motion compensation. The reference picture index is a value that is used to distinguish multiple reference pictures from each other. A coder transfers the reference picture index to a decoder, and the decoder performs motion compensation from reference picture that is indicated by the reference picture index.
Generally, scanning methods are classified into a progressive scanning and an interlaced scanning. In case of the progressive scanning, an image of one frame consists of data that are sampled at the same time. In case of the interlaced scanning, an image of one frame consists of data that are sampled at different times, and the samples are alternated line by line.
The interlaced image of a frame is divided into a top field and a bottom field. In the interlaced scanning, one frame is divided into two field images. In this specification, an image is treated based on unit of picture. A frame or a field may be allocated to the picture.
Three coding methods for an interlaced moving picture are proposed. A first coding method is a field picture coding method which performs a coding process, considering each field as an independent picture at a picture or slice level. A second coding method is the frame picture coding method which performs a coding process after combining two fields into one frame at a picture or slice level. A third coding method is a frame picture coding method with frame/field macroblock, which performs a coding process by combining two fields into one frame and selecting a frame mode or a field mode at a macroblock level.
In the third coding method, two vertically adjacent macroblocks are bound into a pair and the coding is performed in unit of macroblock pair. In FIG. 1, numbers assigned in the macroblock pairs indicate macroblock addresses that are used to distinguish the macroblocks from each other.
Here, frame macroblock is a macroblock which is coded at upper and lower macroblocks of the macroblock pair in unit of frame. In other words, each macroblock is coded in unit of frame after two fields are combined into one frame.
Meanwhile, field macroblock is a macroblock that is coded at upper and lower macroblocks of macroblock pair in unit of field. The macroblock pair is divided into top and independently. At this time, the macroblock pairs are rearranged so that the upper and lower macroblocks may respectively contain only top field component and only bottom field component. The upper macroblock is called a top field macroblock and the lower macroblock is called a bottom field macroblock.
Reference buffer for storing multiple reference pictures are configured in unit of frame. In the frame picture coding, all reference pictures are considered as units of frame in which two fields are combined into one frame, and one picture among the reference frame pictures is used for motion compensation. Accordingly, values are allocated to the reference picture indexes in unit of frame.
The reference picture index for P frame is obtained by sorting all the reference frames in an order reverse to a coding order and then sequentially allocating an index, which is increased by one, to the sorted reference frames. The reference picture index for B frame is classified into list 0 and list 1 and is determined based on a display order of the reference frame.
First, in case of the reference frame list 0, indexes are allocated in a reverse order to the reference frames whose display order lags behind the B frame, and then, the remaining indexes are allocated in the display order to the reference frames whose display order leads the B frame. In case of the reference frame list 1, in contrast to the reference frame list 0, indexes are allocated in the display order to the reference frames whose display order leads the B frame, and then, the remaining indexes are allocated in a reverse order to the reference frame whose display order lags behind the B frame. FIG. 2 shows a reference picture index for P frame when a size of the reference buffer is 5, and FIG. 3 shows the reference picture index lists 0 and 1 for B frame.
In the field picture coding, the fields of all reference pictures are considered as independent pictures and one of the reference field pictures is used for motion compensation. Accordingly, values are allocated to the reference picture indexes in unit of field. At this time, the reference fields are combined in the unit of frame, and then, the reference picture indexes in each field of the P frame are sorted in an order reverse to a coding order of the frame. Then, index values that are increased by one are alternately allocated in an order that starts from a reference field having parity equal to a current picture to a reference field having parity different from the current picture, while visiting the sorted reference frames in sequence.
In addition, in case of the reference picture index lists 0 and 1 for each field of B frame, all the reference fields are combined in unit of frame and then a reference frame is sorted in the same manner as a method of determining reference frame index of B frame. Thereafter, the indexes that are increased by one are alternately allocated in an order that starts from a reference field having parity equal to a current picture to a reference field having parity different from the current picture, while visiting the sorted reference frames in sequence.
FIG. 4 shows reference picture indexes of top and bottom fields of P frame when a size of reference buffer is 5, and FIG. 5 shows reference picture index lists 0 and 1 of top and bottom fields of B frame that can be used as a reference.
In order to improve coding efficiency, the moving picture coding system using multiple reference pictures provides a function of reordering the reference picture indexes before decoding a picture or a slice. It is arbitrarily reordering the reference picture indexes so as to enhance the coding efficiency after determining initial reference picture index for the frame and field pictures. FIG. 6 shows a result of determining initial reference picture index for P frame and arbitrarily reordering indexes according to the above-described method.
When the moving picture coding system using the multiple reference pictures codes an interlaced moving picture into a frame picture having frame/field macroblock, all the reference pictures for the frame macroblock are considered as frame unit and one of the reference frame pictures must be used for motion compensation. In addition, and fields of all the reference pictures for the field macroblock are considered as independent pictures and one of the reference field pictures must be used for motion compensation.
Accordingly, in the frame picture coding that selects the frame/field coding modes at the macroblock level, it is necessary to allocate values to the reference picture index in frame unit or field unit according to the coding mode of each macroblock.